package net.borlis.errors.annotations;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
import java.lang.annotation.*;

/**
 * @author alex@borlis.net
 */
@Inherited
@InterceptorBinding
@Retention(value = RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR})
public @interface ServerExceptionRegister {

    @Nonbinding
    String code() default "500";

    @Nonbinding
    String logMessage() default "an error has been registered";

    @Nonbinding
    Class<? extends Throwable>[] expected();

}
